#ifndef _H_COMMON_MDC
#define _H_COMMON_MDC

#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include <errno.h>
#include <string.h>
#include <unistd.h>
#include <sys/types.h>
#include <gtk/gtk.h>

#define DEBUG 

typedef unsigned bool;
#ifdef TRUE
#undef TRUE
#endif
#define TRUE 1
#ifdef FALSE
#undef FALSE
#endif
#define FALSE 0

#ifdef ASSERT
#undef ASSERT
#endif
#define ASSERT(cond, msg)                                               \
	do {					                        \
		if (!(cond)) {                                          \
			fprintf(stderr, "ASSERT FAILED: %s\n", (msg));	\
			abort();                                        \
		}                                                       \
	} while(0)

#ifdef DEBUG_MSG
#undef DEBUG_MSG
#endif
#ifdef DEBUG
#define DEBUG_MSG(msg)                                  \
	do {                                            \
		fprintf(stdout, "DEBUG: %s\n", (msg));	\
	} while(0)
#else
#define DEBUG_MSG(msg)  \
	do {            \
	} while(0)
#endif

#ifdef ERR_MSG
#undef ERR_MSG
#endif
#define ERR_MSG(msg)                                    \
	do {                                            \
		fprintf(stdout, "ERROR: %s\n", (msg));	\
	} while(0)

/*
 * structure for maildir
 */
struct Maildir {
	char *path;   /* path to the maildir (not include new, cur, or tmp)*/
	char *descr;  /* description of the maildir */
	struct Maildir *next_maildir;/* point to the next Maildir structure */
};

#endif
